#include "ti83plus.inc"
#include "app.inc"


defpage(0, "Sound")
 
_
  ld hl, sound
  ld	e,(hl)
 inc	hl
 ld	d,(hl)
 inc	hl
 di           
 ld   a, 0FDh
 out  (01h), a  

main:
 ld   a, (hl) 
 and  0Fh
 ld   c, a    
 call Label15
 ld   a, (hl) 
 srl  a       
 srl  a       
 srl  a       
 srl  a       
 and  0Fh
 ld   c, a

 push iy
 pop  iy 	;slow this down a little

 call Label15
 inc  hl      
 dec  de      
 ld   a, d    

 push iy
 pop  iy 	;slow this down a little

 or   e       
 jr   nz,main
 jr -_
 ei         
 ret 
         
quit:
 pop af
 pop af		 ;fix the stack
 pop af
 ret

Label15:
 ld   b, c    
 inc  b       
 ld   a, 0D3h

Label18:
 out  (00h), a  
 djnz Label18
 ld   a, 10h
 sub  c       
 ld   b, a    
 ld   a, 0D0h

Label19:
 out  (00h), a  
 djnz Label19
 ret



Sound:

.dw 1983
.db 32,33,32,33,32,32,32,32,103,103,1,32,68,4,32,32,32,32,40,124,103,103,3,32,4,32,32,32,178,32,4,32,32,225,32,32,32,32,32,32,32,32,32,32,32,32,9,32,41,32,32,32,32,32,119,118,2,32,1,32,4,255,190,250,32,32,32,32,1,32,32,32,9,32,32,32,102,118,32,32,20,32,102,103,20,32,119,119,119,119,135,120,136,136,136,136,153,103,102,118,119,119,119,119,152,153,153,169,102,86,102,118,102,119,119,168,170,170,202,86,69,101,134,102,118,102,184,170,171,202,71,84,68,118,102,118,102,184,171,171,186,56,83,85,117,119,117,119,183,187,171,186,57,99,85,118,136,117,119,182,187,171,186,136,83,85,102,136,100,118,182,187,171,186,136,68,102,102,136,85,101,166,186,187,171,153,68,102,101,134,69,100,150,185,187,171,153,53,102,102,134,70,100,151,185,187,172,153,71,85,87,133,71,100,119,167,187,188,153,72,68,88,117,71,100,119,167,187,188,136,88,69,88,101,72,100,119,167,170,188,155,105,70,103,102,102,100,119,166,187,187,155,136,56,102,86,102,100,119,150,170,187,155,168,74,102,87,102,100,119,150,169,186,155,168,90,85,87,85,101,119,134,168,170,170,184,107,68,103,85,101,119,135,168,170,186,136,138,51,103,68,102,118,135,168,170,186,136,170,68,119,51,102,118,119,167,153,169,153,185,68,102,70,102,102,118,151,170,169,153,185,85,101,70,117,103,118,135,170,153,170,185,102,117,71,133,104,134,120,153,152,187,185,155,116,55,132,88,119,120,153,152,187,169,170,116,71,132,88,119,119,137,152,156,185,73,100,51,133,85,119,119,153,137,156,185,136,101,68,134,85,119,135,153,153,155,169,153,101,85,117,102,118,135,152,153,155,169,170,86,85,116,119,102,134,152,153,187,170,187,85,102,117,119,117,135,135,152,187,154,187,85,102,101,134,117,135,136,152,170,137,187,102,102,101,118,117,119,136,152,187,138,187,86,101,102,118,101,118,136,152,187,138,187,87,101,102,118,85,118,136,152,187,154,185,87,101,102,118,85,118,136,152,204,154,185,88,101,102,118,85,118,136,152,187,138,184,88,85,119,103,102,118,136,168,186,138,168,88,85,119,103,102,118,119,167,170,154,169,88,85,119,104,119,102,118,168,170,154,153,119,86,102,103,119,118,103,168,170,170,138,119,70,102,104,119,118,103,168,170,170,138,119,69,102,104,118,119,103,167,170,170,139,102,54,102,104,118,119,103,166,170,170,155,102,55,102,104,134,120,103,119,170,153,155,85,55,83,120,135,120,103,119,169,153,171,68,56,83,120,135,136,104,102,169,136,140,88,55,99,120,135,153,104,85,170,136,155,89,71,100,120,151,153,120,85,169,153,155,89,70,84,119,151,153,120,85,169,154,171,90,85,85,119,167,136,136,85,168,154,171,106,85,85,102,167,137,120,133,152,170,154,102,84,102,133,170,137,120,118,151,187,154,102,83,102,132,168,153,121,118,151,187,154,102,67,119,132,168,153,121,118,135,187,138,119,67,119,116,183,137,136,119,135,187,137,153,83,117,100,182,138,136,119,119,187,121,153,67,116,101,182,154,137,119,119,187,121,151,67,116,102,150,170,137,119,135,187,105,150,52,115,102,134,170,154,136,120,170,106,150,54,115,102,135,170,154,136,120,151,107,134,38,114,85,119,170,170,119,120,151,107,134,23,97,85,119,153,171,119,136,168,106,118,85,98,85,136,153,170,122,153,153,122,103,102,83,85,151,136,186,139,168,138,138,104,85,68,102,135,136,185,123,168,138,153,105,85,68,102,135,136,201,140,183,155,136,106,68,69,85,135,136,200,156,136,171,136,121,68,69,68,119,151,167,154,136,186,136,121,51,69,68,120,151,152,169,153,186,136,137,51,68,84,120,135,136,169,153,186,153,136,56,83,85,119,135,136,152,170,186,170,151,89,82,69,118,119,136,136,187,202,188,135,72,82,69,119,104,136,136,187,186,203,120,103,66,84,102,120,136,136,187,187,203,105,118,34,98,85,120,119,136,152,187,203,121,135,17,97,68,119,119,136,136,187,203,138,136,51,96,117,135,151,121,185,187,204,138,119,17,102,117,135,135,120,153,187,187,137,119,35,98,117,135,135,136,153,203,187,154,119,21,81,101,134,135,152,153,202,187,155,136,21,81,85,133,119,151,136,187,187,155,137,21,65,84,117,119,151,136,187,204,171,138,38,50,84,117,136,152,136,186,203,170,154,54,35,51,101,136,135,136,186,187,187,155,70,52,51,100,119,135,136,186,187,187,155,85,52,34,117,119,120,135,186,203,187,171,102,53,34,116,102,120,135,170,186,187,171,102,53,34,100,102,120,151,170,186,187,187,119,53,17,100,102,120,135,170,186,187,187,119,54,17,99,102,120,135,170,170,187,203,119,38,18,84,101,120,135,170,186,204,188,119,39,18,67,100,120,135,187,185,204,188,119,55,19,67,100,136,135,187,185,204,172,138,56,35,51,99,119,135,187,185,204,172,138,57,35,51,99,119,135,170,170,204,172,122,57,35,51,98,102,136,153,186,203,188,123,72,36,68,82,119,135,153,186,219,188,139,87,21,68,82,119,135,152,186,235,189,139,136,21,68,83,119,134,152,186,235,189,139,119,21,68,83,102,134,152,186,235,190,155,119,35,68,84,101,118,151,186,235,221,171,119,51,51,84,85,119,151,170,234,221,171,54,51,67,68,117,103,170,185,255,172,170,38,50,67,68,85,87,153,186,255,157,169,22,65,83,85,68,103,153,186,255,173,170,39,66,84,85,68,119,136,186,238,174,170,40,66,68,84,68,120,119,186,235,190,171,56,51,68,84,68,135,102,186,219,206,172,73,52,68,84,68,119,87,185,235,206,156,119,53,68,69,68,118,87,185,219,222,173,119,54,51,70,68,117,87,184,219,221,173,119,54,51,54,67,117,87,184,203,221,189,119,87,51,54,67,101,86,184,203,221,204,119,104,51,70,68,101,102,136,203,221,204,119,88,53,69,68,101,118,136,186,221,220,136,104,54,69,68,84,117,119,186,204,204,140,119,71,69,68,68,101,119,187,204,204,156,136,88,69,84,68,100,119,187,204,187,155,137,88,85,83,68,101,102,186,187,187,139,137,104,85,67,85,84,102,186,187,188,155,137,120,85,68,102,68,85,186,187,188,171,153,105,102,52,85,68,84,186,187,188,171,153,106,119,52,85,68,84,185,171,187,187,153,106,119,52,83,69,84,184,171,187,187,153,105,119,52,67,85,85,183,187,187,187,153,121,119,53,67,69,68,167,186,187,187,170,137,104,54,67,84,69,119,185,170,187,187,136,104,70,68,84,69,102,185,186,203,139,152,102,70,68,84,68,167,187,170,202,139,152,85,70,68,84,68,166,186,171,202,139,152,85,86,68,67,68,165,186,171,202,155,153,102,86,68,67,68,165,186,155,185,187,138,119,102,68,67,68,149,169,171,186,204,154,119,118,68,68,68,149,153,186,171,204,170,119,102,70,52,67,132,152,187,171,187,170,119,103,54,51,67,132,152,170,187,187,186,136,120,55,51,67,85,136,170,187,187,202,156,119,39,35,66,85,135,153,186,187,202,172,135,56,35,50,68,151,153,186,187,201,156,135,56,51,50,68,167,153,186,203,201,172,136,72,34,50,68,167,136,186,203,201,204,137,88,34,34,68,167,138,186,187,201,204,153,88,34,33,68,166,138,185,187,186,203,170,104,51,17,68,166,138,184,171,187,203,187,86,51,33,66,149,121,184,171,187,203,204,87,68,17,65,133,136,183,171,187,187,221,87,85,17,65,117,135,136,171,170,187,221,88,85,2,64,101,150,136,171,170,188,238,89,101,2,64,101,166,136,186,187,204,220,89,85,3,64,102,149,136,186,187,204,204,105,86,3,64,102,133,136,170,187,220,205,105,86,3,48,102,134,153,169,186,219,205,121,87,51,49,102,118,136,169,202,220,205,121,87,51,49,101,118,137,168,188,235,170,119,68,18,68,101,118,136,168,221,235,170,120,68,35,66,101,118,136,168,221,219,187,135,68,51,67,101,118,151,153,221,220,204,134,85,51,83,85,117,136,152,204,220,204,118,87,51,67,70,116,136,152,204,220,204,119,87,51,67,70,116,136,151,187,236,206,136,72,51,67,102,116,136,151,187,236,222,136,72,51,67,85,117,136,151,170,235,222,137,56,68,84,85,117,136,151,153,236,206,137,72,68,68,85,117,136,151,153,235,206,138,72,68,68,85,101,136,151,153,219,205,170,89,68,68,85,117,135,151,137,219,205,170,89,68,52,68,117,135,135,136,218,205,187,106,68,68,68,117,119,136,152,187,204,187,105,68,68,68,117,119,120,151,170,220,204,105,85,53,67,117,103,136,135,170,203,221,121,87,52,67,116,103,136,136,170,

Validate()



